
//
// Created by ASUS on 2023/5/11.
//
#include<iostream>

using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    cout << endl;
    int arr[10000000]={0};
    int brr[10000000]={0};
    int i, f;
    for (i = 0; i < a; i++)
    {
        cin >> arr[i];
    }
    cout << endl;
    for (f = 0; f < b; f++)
    {
        cin >> brr[f];
    }
    int crr[a + b];
    int h;
    for (h = 0; h < a + b; h++)
    {
        if (h < a)
        {
            crr[h] = arr[h];
        }
        else {
            crr[h] = brr[h - a];
        }
    }
    int k, l;
    for (k = 0; k < a + b; k++)
    {
        int temp;
        for (l = k + 1; l < a + b; l++)
        {
            crr[k] = temp;
            crr[k] = crr[l];
            crr[l] = temp;



        }
    }
    for (i = 0; i < a + b; i++)
    {
        cout << crr[i];
    }
}
